3.2536 \(\int \frac{\left (a+b x^n\right )^3}{x} \, dx\)

Optimal. Leaf size=50 \[ a^3 \log (x)+\frac{3 a^2 b x^n}{n}+\frac{3 a b^2 x^{2 n}}{2 n}+\frac{b^3 x^{3 n}}{3 n} \]

[Out]

(3*a^2*b*x^n)/n + (3*a*b^2*x^(2*n))/(2*n) + (b^3*x^(3*n))/(3*n) + a^3*Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.054967, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154 \[ a^3 \log (x)+\frac{3 a^2 b x^n}{n}+\frac{3 a b^2 x^{2 n}}{2 n}+\frac{b^3 x^{3 n}}{3 n} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x^n)^3/x,x]

[Out]

(3*a^2*b*x^n)/n + (3*a*b^2*x^(2*n))/(2*n) + (b^3*x^(3*n))/(3*n) + a^3*Log[x]

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{a^{3} \log{\left (x^{n} \right )}}{n} + \frac{3 a^{2} b x^{n}}{n} + \frac{3 a b^{2} \int ^{x^{n}} x\, dx}{n} + \frac{b^{3} x^{3 n}}{3 n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b*x**n)**3/x,x)

[Out]

a**3*log(x**n)/n + 3*a**2*b*x**n/n + 3*a*b**2*Integral(x, (x, x**n))/n + b**3*x*
*(3*n)/(3*n)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0401134, size = 41, normalized size = 0.82 \[ a^3 \log (x)+\frac{b x^n \left (18 a^2+9 a b x^n+2 b^2 x^{2 n}\right )}{6 n} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x^n)^3/x,x]

[Out]

(b*x^n*(18*a^2 + 9*a*b*x^n + 2*b^2*x^(2*n)))/(6*n) + a^3*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0., size = 52, normalized size = 1. \[{\frac{{b}^{3} \left ({x}^{n} \right ) ^{3}}{3\,n}}+{\frac{3\,a{b}^{2} \left ({x}^{n} \right ) ^{2}}{2\,n}}+3\,{\frac{{a}^{2}b{x}^{n}}{n}}+{\frac{{a}^{3}\ln \left ({x}^{n} \right ) }{n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b*x^n)^3/x,x)

[Out]

1/3/n*b^3*(x^n)^3+3/2/n*a*b^2*(x^n)^2+3*a^2*b*x^n/n+1/n*a^3*ln(x^n)

_______________________________________________________________________________________

Maxima [A]  time = 1.44071, size = 65, normalized size = 1.3 \[ \frac{a^{3} \log \left (x^{n}\right )}{n} + \frac{2 \, b^{3} x^{3 \, n} + 9 \, a b^{2} x^{2 \, n} + 18 \, a^{2} b x^{n}}{6 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^3/x,x, algorithm="maxima")

[Out]

a^3*log(x^n)/n + 1/6*(2*b^3*x^(3*n) + 9*a*b^2*x^(2*n) + 18*a^2*b*x^n)/n

_______________________________________________________________________________________

Fricas [A]  time = 0.226023, size = 59, normalized size = 1.18 \[ \frac{6 \, a^{3} n \log \left (x\right ) + 2 \, b^{3} x^{3 \, n} + 9 \, a b^{2} x^{2 \, n} + 18 \, a^{2} b x^{n}}{6 \, n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^3/x,x, algorithm="fricas")

[Out]

1/6*(6*a^3*n*log(x) + 2*b^3*x^(3*n) + 9*a*b^2*x^(2*n) + 18*a^2*b*x^n)/n

_______________________________________________________________________________________

Sympy [A]  time = 1.14972, size = 53, normalized size = 1.06 \[ \begin{cases} a^{3} \log{\left (x \right )} + \frac{3 a^{2} b x^{n}}{n} + \frac{3 a b^{2} x^{2 n}}{2 n} + \frac{b^{3} x^{3 n}}{3 n} & \text{for}\: n \neq 0 \\\left (a + b\right )^{3} \log{\left (x \right )} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b*x**n)**3/x,x)

[Out]

Piecewise((a**3*log(x) + 3*a**2*b*x**n/n + 3*a*b**2*x**(2*n)/(2*n) + b**3*x**(3*
n)/(3*n), Ne(n, 0)), ((a + b)**3*log(x), True))

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (b x^{n} + a\right )}^{3}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^3/x,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^3/x, x)